﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace theguineasyndrome
{
    public class SpeedSplash : Splash
    {
        public SpeedSplash(Texture2D texture, Vector2 position)
            : base(texture, position)
        {
            //setColor(new Color(0.65f, 0.65f, 0.65f, 0.65f));
        }

        public override void applyEffect(GameTime gameTime, Character character)
        {
            CharacterModel model = character.getModel();
            if (character.SpeedX != 0)
            {
                character.ModifiedSpeed += (float)(gameTime.ElapsedGameTime.TotalMilliseconds * 0.4);
                if (character.ModifiedSpeed > model.getMaxSpeedX())
                    character.ModifiedSpeed = model.getMaxSpeedX();
            }
            else
                character.ModifiedSpeed = model.getSpeed();
        }
    }
}
